import React from 'react';
import classnames from 'classnames';

import './index.less';
//component



export default class view extends React.Component {
    static propTypes = {
        className: React.PropTypes.string,
        icon: React.PropTypes.string.isRequired

    };

    static defaultProps = {
        //name: 'component name'
    };

    constructor(props, context) {

        super(props, context);

        // init state;
        this.state = {

        };

        this.icons = {
            vr: '\ue61f',
            quanping: '\ue613',
            jieping: '\ue612',
            fenlei: '\ue610',
            huifu: '\ue615',
            zhanghaoshezhi: '\ue623',
            help: '\ue62c',
            mode: '\ue62d',
            zoom: '\ue650',
            rotate: '\ue64c',
            move: '\ue63e',
        }
    }
    componentWillMount() {
        this._isMounted = true;

    }

    componentDidMount() {

    }

    componentWillUnmount() {
        this._isMounted = false;
    }

    render() {

        const classNames = classnames({
            'orin-sw-refonticon-root': true,
            ['icon-' + this.props.icon]: this.props.icon ? true : false,
            [this.props.className]: this.props.className ? true : false
        });

        return (
            <i className={classNames} > {this.icons[this.props.icon]} </i>
        );
    }
}
